<?php

function neogeo_admin_country_main(){
global $XoopsTpl; 
xoops_cp_header();
	$XoopsTpl->display('db:neogeo_admin_mainmenu.html');	
	$countryH = & xoops_getmodulehandler("country",'neogeo');
	$countryitems = $countryH->getObjects();
	$XoopsTpl->assign("countryitems",$countryitems);
	$XoopsTpl->display('db:neogeo_admin_country_main.html');

xoops_cp_footer();	
}
function neogeo_admin_country_create(){
global $XoopsTpl;    
xoops_cp_header(); 
$XoopsTpl->display('db:neogeo_admin_mainmenu.html');	
$XoopsTpl->display('db:neogeo_admin_country_create.html');
xoops_cp_footer(); 
}
function neogeo_admin_country_create_ok(){
$countryH = & xoops_getmodulehandler("country",'neogeo');
	 $countryO = $countryH->create();
	 $countryO->setFormVars($_POST,'country_');
	 $countryH->insert($countryO);
	 redirect_header('index.php?type=country');
}
function neogeo_admin_country_edit(){
global $XoopsTpl;    
$countryH = & xoops_getmodulehandler("country",'neogeo');
$countryO = $countryH->get($_GET['id']);
$XoopsTpl->assign_by_ref("countryO",$countryO);
xoops_cp_header(); 
$XoopsTpl->display('db:neogeo_admin_mainmenu.html');	
$XoopsTpl->display('db:neogeo_admin_country_edit.html');
xoops_cp_footer(); 
}
function neogeo_admin_country_edit_ok(){
$countryH = & xoops_getmodulehandler("country",'neogeo');
	 $countryO = $countryH->get($_GET['id']);
	 $countryO->setFormVars($_POST,'country_');
	 $countryH->insert($countryO);
	 redirect_header('index.php?type=country');
}
function neogeo_admin_country_delete_ok(){
$countryH = & xoops_getmodulehandler("country",'neogeo');
	 $countryO = $countryH->get($_GET['id']);
#	 $countryO->setFormVars($_POST,'country_');
	 $countryH->delete($countryO);
	 redirect_header('index.php?type=country');
}

?>